package com.libinshen.wxpay.payV3Wx.controller;


import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lbs
 */
@CrossOrigin
@Api(tags = "商品订单管理")
@RestController
@RequestMapping("/api/order-info")
public class OrderInfoController {

//    @Resource
//    private OrderInfoService orderInfoService;
//
//    @ApiOperation("订单列表")
//    @GetMapping("/list")
//    public Result list() {
//        List<OrderInfo> list = orderInfoService.listOrderByCreateTimeDesc();
//        return Result.ok().data("list", list);
//    }
//
//    @ApiOperation("查询本地订单状态")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "orderNo", dataType = "String", value = "订单编号")
//    })
//    @GetMapping("/query-order-status/{orderNo}")
//    public Result queryOrderStatus(@PathVariable String orderNo) {
//        String orderStatus = orderInfoService.getOrderStatus(orderNo);
//        if (OrderStatus.SUCCESS.getType().equals(orderStatus)) {
//            return Result.ok().setMessage("支付成功");
//        }
//
//        return Result.ok().setCode(101).setMessage("支付中......");
//    }
//
//    @ApiOperation("查询超时minutes分钟的订单列表")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "orderNo", dataType = "String", value = "订单编号")
//    })
//    @GetMapping("/getNoPayOrderByDuration/{minutes}")
//    public Result getNoPayOrderByDuration(@PathVariable Integer minutes) {
//        List<OrderInfo> noPayOrderList = orderInfoService.getNoPayOrderByDuration(minutes);
//        return Result.ok().data("list", noPayOrderList);
//    }
}
